package com.lxl.rabbitmq1.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class TopicConsumer {

    @RabbitListener(queues = "hunan.queue")
    public void  getHunan(String message){

        System.out.println("监听湖南的信息："+message);
    }
    @RabbitListener(queues = "hubei.queue")
    public void  getHubei(String message){

        System.out.println("监听湖北的消息："+message);
    }
    @RabbitListener(queues = "news.queue")
    public void  getNews(String message){

        System.out.println("监听新闻消息："+message);
    }
    @RabbitListener(queues = "weather.queue")
    public void  get(String message){

        System.out.println("监听天气消息："+message);
    }
}